import { DeleteDto, IndexDto, ShowDto } from '@libs/common/dto';
import { ApiProperty } from '@nestjs/swagger';

import { Member } from '../entities/member.entity';

type Props = keyof Member | 'ids';

export class MemberIndexDto extends IndexDto<Member & { ids: string }> {}

export class FindMemberDto {
  @ApiProperty({ description: '用户ID，三选一' })
  userId?: string;

  @ApiProperty({ description: '钉钉ID，三选一' })
  dingUserId?: string;

  @ApiProperty({ description: '姓名，三选一' })
  name?: string;

  @ApiProperty({ description: '状态 1:在职 0:离职' })
  status?: Member['status'];
}

export class ShowMemberDto extends ShowDto {}
export class DeleteMemberDto extends DeleteDto {}
